﻿<UserControl x:Class="PresentationAid.Tabs.KinectTab"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:elysium="http://schemas.codeplex.com/elysium"
             xmlns:params="http://schemas.codeplex.com/elysium/params"
             xmlns:local="clr-namespace:PresentationAid.Control"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" SizeChanged="UserControlSizeChanged">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="250" />
        </Grid.ColumnDefinitions>

        <!-- Kinect display -->
        <Grid ClipToBounds="True">
            <Image Name="KinectImage" Source="{Binding Bitmap}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}" />
            <Canvas Name="SkeletonCanvas" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}" />
        </Grid>
        <!-- End Kinect display -->

        <!-- Settings -->
        <Grid Grid.Column="1" Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <ComboBox Name="KinectSensorList" Grid.ColumnSpan="2" Margin="0,0,0,20" SelectionChanged="KinectSensorListSelectionChanged" />

            <Border BorderThickness="0,0,0,1" Grid.Row="1" BorderBrush="{DynamicResource HighlightBrush}" Margin="0,8,0,5" Width="90" HorizontalAlignment="Left">
                <TextBlock FontSize="15" FontWeight="Light" Margin="5,5,5,5" Foreground="{DynamicResource LowlightBrush}">Settings</TextBlock>
            </Border>

            <TextBlock Grid.Row="2" VerticalAlignment="Center" FontSize="12" Margin="20,0,0,0">Depth view:</TextBlock>
            <elysium:ToggleSwitch Name="DepthViewToggle" Grid.Column="1" Grid.Row="2" OnHeader="On" OffHeader="Off" IsChecked="False" Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}" Checked="DepthViewToggleChecked" Unchecked="DepthViewToggleUnchecked" />

            <TextBlock Grid.Row="3" VerticalAlignment="Center" FontSize="12" Margin="20,0,0,0">Skeletons:</TextBlock>
            <elysium:ToggleSwitch Name="SkeletonToggle" Grid.Column="1" Grid.Row="3" OnHeader="On" OffHeader="Off" IsChecked="True" Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}" Checked="SkeletonToggleChecked" Unchecked="SkeletonToggleUnchecked" />

            <TextBlock Grid.Row="4" VerticalAlignment="Center" FontSize="12" Margin="20,0,0,0">Seated:</TextBlock>
            <elysium:ToggleSwitch Name="SeatedToggle" Grid.Column="1" Grid.Row="4" OnHeader="On" OffHeader="Off" IsChecked="True" Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}" Checked="SeatedToggleChecked" Unchecked="SeatedToggleUnchecked" />

            <Border Grid.Row="5" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource HighlightBrush}" Margin="0,8,0,5" Width="90" HorizontalAlignment="Left">
                <TextBlock FontSize="15" FontWeight="Light" Margin="5,5,5,5" Foreground="{DynamicResource LowlightBrush}">Angle</TextBlock>
            </Border>

            <local:KinectElevationControl x:Name="ElevationControl" IsEnabled="False" Grid.Row="6" Grid.ColumnSpan="2" Height="140" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,20,0,0" ElevationChanged="ElevationControlOnElevationChanged" />
        </Grid>
        <!-- End Settings -->
    </Grid>
</UserControl>
